Manual para Replicar

Cargar Librerias

library(tidyverse) # manejo de dataframes
library(reshape2)  # para tranfromar data de long a wide
library(WDI)       # libreria para acceder a metadata de banco mundial
library(readxl)    # leer archivos de excel
library(readr)     # leer archivos csv
library(visdat)    # visualizacion de datos como graficos
library(plotly)    # graficos
library(plm)       # modelos lineales para datos panel
library(lmtest)    # Pruebas de modelos lineales
library(broom)     # Manejar tablas
library(knitr)     # Imprimir tablas
library(car)       # test y utilidades para modelos

Cargar Datos

Paises

country_class <- read_excel("Data/CLASS.xlsx", sheet = "List of economies")
country_class <- country_class %>% 
  filter(!is.na(Region), !is.na(`Income group`)) %>%
  merge(WDI_data$country, by.x='Code', by.y ='iso3c') %>% 
  select(Code, iso2c, country, Region, `Income group`) %>%
  rename(iso3c = `Code`, region = Region, income = `Income group`)

V-DEM

v_dem_vars <- c("Electoral democracy index", "Exclusion by Gender index")
V_DEM <- read_excel("Data/VDEM-CORE.xlsx", sheet = "Data")

V_DEM <- V_DEM %>%
  select(-3, -5, -6, -7, -8) %>% 
  filter(Indicator %in% v_dem_vars) %>% 
  rename(iso3c = `Economy ISO3`, country = `Economy Name`, indicator = Indicator) %>%
  melt(id.vars = c("iso3c", "country", "indicator"), variable.name = "year") %>%
  arrange(iso3c, indicator, year) %>%
  merge(country_class) %>%
  select(iso2c, indicator, year, value)

V_DEM$indicator[V_DEM$indicator == "Electoral democracy index"] <- "dem"
V_DEM$indicator[V_DEM$indicator == "Exclusion by Gender index"] <- "exc"
v_dem_vars <- c("dem", "exc")

HDI

hdi_vars <- c('hdi')
HDI <- read_csv("Data/datos_python_HDI.csv", 
                col_names = c('Code', 'iso2c', 'indicator', 'year', 'value'), 
                col_types = list(col_character(), 
                                 col_character(), 
                                 col_character(), 
                                 col_double(), 
                                 col_double()),
                na = 'None') %>% 
  filter(indicator %in% hdi_vars) %>%
  select(iso2c, indicator, year, value)

WORLD BANK

wb_vars <- c('ODA.GNI','ODA.ALL','ODA.PC','CC','GE','PV','RQ','RL','VA','GDP.PC','GDP.PPP','GROW','SAV')
WB <- data.frame(indicator = character(), iso2c = character(), year = double(), value = double())


for (indicator in wb_vars) {
  WB <- rbind(WB, read_csv(paste("Data/datos_python_", indicator, ".csv", sep =''), 
                           col_names = c('indicator', 'iso2c', 'year', 'value'),
                           col_types = list(col_character(), col_character(), col_double(), col_double()),
                           na = "None"))
}

WB <- WB %>% select(iso2c, indicator, year, value)

CLIO-INFRA

CLIO <- read_excel("Data/GlobalExtremePovertyDollaraDay_Compact.xlsx", sheet = "Data Long Format")

names(CLIO) <- c("ccode", "country", "year", "value")

CLIO[CLIO=="Cape Verde"] <- "Cabo Verde"
CLIO[CLIO=="Congo"] <- "Congo, Rep."
CLIO[CLIO=="Egypt"] <- "Egypt, Arab Rep."
CLIO[CLIO=="Iran"] <- "Iran, Islamic Rep."
CLIO[CLIO=="Kyrgyzstan"] <- "Kyrgyz Republic"
CLIO[CLIO=="Laos"] <- "Lao PDR"
CLIO[CLIO=="Macedonia"] <- "North Macedonia"
CLIO[CLIO=="Russia"] <- "Russian Federation"
CLIO[CLIO=="Slovakia"] <- "Slovak Republic"
CLIO[CLIO=="South Korea"] <- "Korea, Rep."
CLIO[CLIO=="Swaziland"] <- "Eswatini"
CLIO[CLIO=="Syria"] <- "Syrian Arab Republic"
CLIO[CLIO=="The Gambia"] <- "Gambia, The"
CLIO[CLIO=="Turkey"] <- "Turkiye"
CLIO[CLIO=="Venezuela"] <- "Venezuela, RB"
CLIO[CLIO=="Yemen"] <- "Yemen, Rep."

CLIO <- CLIO %>%
  merge(WDI_data$country, all.x = TRUE) %>%
  mutate(indicator = 'POV') %>%
  select(indicator, iso2c, year, value) %>%
  arrange(iso2c, year) %>%
  select(iso2c, indicator, year, value)

OUR WORLD IN DATA

LIBERTIES <- read_csv("DATA/political-civil-liberties-index.csv") %>%
  filter(!is.na(Code)) %>%
  mutate(indicator = 'LIB') %>%
  merge(country_class, by.x = 'Code', by.y = 'iso3c') %>%
  select(iso2c, indicator, year, value)

Manipular Datos

Transformar datos a la estructura wide

datos_paper <- rbind(WB, HDI, CLIO, LIBERTIES, V_DEM) %>%
  pivot_wider(names_from = indicator, values_from = value) %>%
  complete(iso2c, year)

Definir Índice de Governanza

datos_paper <- datos_paper %>% mutate(GOV = (CC + GE + PV + RQ + RL + VA) / 6)

Definir variables Dicotomicas / clasificacion

datos_paper <- datos_paper %>% mutate(GOV_high = case_when(is.na(GOV) ~ NA_real_, GOV >= 0 ~ 1, TRUE ~ 0))

dem_avg <- read_csv("Data/Electoral Democracy Index.csv", show_col_types = FALSE)

datos_paper <- datos_paper %>% merge(dem_avg %>% select(1, 2), by.x = 'year', by.y = 'Year', all.x = TRUE) %>%
                mutate(dem_high = case_when(is.na(dem) ~ NA_real_, 
                                            is.na(`*World`) ~ NA_real_,
                                            dem >= `*World` ~ 1, 
                                            TRUE ~ 0)) %>% select(-`*World`)

exc_avg <- read_csv("Data/Exclusion by Gender.csv", show_col_types = FALSE)

datos_paper <- datos_paper %>% merge(exc_avg %>% select(1, 2), by.x = 'year', by.y = 'Year', all.x = TRUE) %>%
                mutate(exc_high = case_when(is.na(exc) ~ NA_real_, 
                                            is.na(`*World`) ~ NA_real_,
                                            exc >= `*World` ~ 1, 
                                            TRUE ~ 0)) %>% select(-`*World`) %>%
                mutate(no_exc = 1 - exc, no_exc_high = 1 - exc_high, inv_exc = 1 / exc, inv_exc_high = 1 - exc_high)
                

lib_avg <- read_csv("DATA/political-civil-liberties-index.csv", show_col_types = FALSE) %>% filter(Code == 'OWID_WRL')

datos_paper <- datos_paper %>% merge(lib_avg %>% select(3, 4) %>% rename(WORLD = value), all.x = TRUE) %>%
                mutate(lib_high = case_when(is.na(LIB) ~ NA_real_, 
                                            is.na(WORLD) ~ NA_real_,
                                            LIB >= WORLD ~ 1, 
                                            TRUE ~ 0)) %>% select(-WORLD)

datos_paper <- datos_paper %>% merge(country_class %>% select(iso2c, region, income), all.x = TRUE) 

Filtros

## # A tibble: 3 × 2
##   income              countries
##   <chr>                   <int>
## 1 Low income                 12
## 2 Lower middle income        35
## 3 Upper middle income        30

## #### Filtro de países
##  [1] "AF" "AO" "AZ" "BA" "BF" "BT" "BY" "BZ" "CU" "CV" "DJ" "DM" "ER" "ET" "FM"
## [16] "GD" "GE" "GN" "GQ" "GW" "KI" "KM" "KP" "LB" "LC" "LR" "LY" "MD" "ME" "MG"
## [31] "MH" "MK" "MV" "NG" "PS" "RS" "RW" "SB" "SO" "SR" "SS" "SY" "TD" "TL" "TM"
## [46] "TO" "TV" "UA" "UZ" "VC" "VU" "WS" "XK" "YE"
## #### Primer año
## [1] 1993
## #### Ultimo año
## [1] 2022

Modelos

# 1993 - 2022
datos_model <- country_class %>% filter(income != 'High income') %>% merge(datos_paper) %>%
  select(iso2c, year, region, income, ODA.GNI, ODA.ALL, ODA.PC, GDP.PC, GDP.PPP, 
         GROW, hdi, LIB, lib_high, dem, dem_high, exc, exc_high, no_exc, no_exc_high, inv_exc, inv_exc_high) %>%
  arrange(iso2c, year) %>% filter(year >= first_y, year <= last_y, !iso2c %in% filtro_c)

Índice de desarrollo humano

hdi ~ ODA.PC x exc_high + GDP.PC + exc

OLS
term estimate std.error statistic p.value significant
(Intercept) 0.5045561 0.0062327 80.9526512 0.0000000 ***
ODA.PC 0.0000658 0.0000660 0.9979901 0.3183890
exc_high -0.0273137 0.0069231 -3.9452946 0.0000821 ***
GDP.PC 0.0000354 0.0000007 51.0469154 0.0000000 ***
exc 0.0083885 0.0146764 0.5715656 0.5676721
ODA.PC:exc_high -0.0000928 0.0000762 -1.2179073 0.2233839
  • R-Squared: 0.5706135
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
33650.77 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
42.32757 0 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
2084.092 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
(Intercept) 0.5045561 0.0060831 82.9445243 0.0000000 ***
ODA.PC 0.0000658 0.0000650 1.0133527 0.3109981
exc_high -0.0273137 0.0068056 -4.0133849 0.0000618 ***
GDP.PC 0.0000354 0.0000008 45.2753250 0.0000000 ***
exc 0.0083885 0.0134999 0.6213764 0.5344134
ODA.PC:exc_high -0.0000928 0.0000704 -1.3167219 0.1880628
Fixed Effects
term estimate std.error statistic p.value significant
ODA.PC 0.0001893 0.0000377 5.026430 0.0000005 ***
exc_high 0.0155413 0.0044658 3.480048 0.0005110 ***
GDP.PC 0.0000165 0.0000005 32.975269 0.0000000 ***
exc -0.3776387 0.0156980 -24.056493 0.0000000 ***
ODA.PC:exc_high -0.0000864 0.0000419 -2.065402 0.0390003 *
  • R-Squared: 0.5778696
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
31788.47 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
71.13509 0 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
1703.652 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
ODA.PC 0.0001893 0.0000988 1.9147168 0.0556566 .
exc_high 0.0155413 0.0158502 0.9805086 0.3269416
GDP.PC 0.0000165 0.0000016 10.5977062 0.0000000 ***
exc -0.3776387 0.0472271 -7.9962323 0.0000000 ***
ODA.PC:exc_high -0.0000864 0.0001142 -0.7571761 0.4490244
Random Effects
term estimate std.error statistic p.value significant
(Intercept) 0.6790301 0.0109624 61.941477 0.0000000 ***
ODA.PC 0.0001884 0.0000380 4.951019 0.0000007 ***
exc_high 0.0146207 0.0045069 3.244072 0.0011783 **
GDP.PC 0.0000171 0.0000005 34.042491 0.0000000 ***
exc -0.3521546 0.0154305 -22.822041 0.0000000 ***
ODA.PC:exc_high -0.0000897 0.0000423 -2.119310 0.0340643 *
  • R-Squared: 0.5665838
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
32104.99 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
72.01155 0 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
1736.108 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
(Intercept) 0.6790301 0.0102685 66.127685 0.0000000 ***
ODA.PC 0.0001884 0.0000394 4.776484 0.0000019 ***
exc_high 0.0146207 0.0052493 2.785268 0.0053921 **
GDP.PC 0.0000171 0.0000005 32.137165 0.0000000 ***
exc -0.3521546 0.0190129 -18.521870 0.0000000 ***
ODA.PC:exc_high -0.0000897 0.0000450 -1.993088 0.0463695 *
Time-Fixed Effects
term estimate std.error statistic p.value significant
factor(year)1994 0.0042447 0.0030047 1.4126930 0.1578875
factor(year)1995 0.0085316 0.0030082 2.8360736 0.0046090 **
factor(year)1996 0.0132511 0.0030105 4.4016264 0.0000113 ***
factor(year)1997 0.0175607 0.0030154 5.8236071 0.0000000 ***
factor(year)1998 0.0222234 0.0030188 7.3615516 0.0000000 ***
factor(year)1999 0.0277789 0.0030209 9.1954475 0.0000000 ***
factor(year)2000 0.0319760 0.0030746 10.3999309 0.0000000 ***
factor(year)2001 0.0375192 0.0030761 12.1971282 0.0000000 ***
factor(year)2002 0.0429128 0.0030864 13.9039773 0.0000000 ***
factor(year)2003 0.0482394 0.0030981 15.5707732 0.0000000 ***
factor(year)2004 0.0546077 0.0031093 17.5626316 0.0000000 ***
factor(year)2005 0.0613845 0.0031233 19.6540228 0.0000000 ***
factor(year)2006 0.0681522 0.0031386 21.7139058 0.0000000 ***
factor(year)2007 0.0750406 0.0031677 23.6895448 0.0000000 ***
factor(year)2008 0.0810286 0.0032088 25.2519581 0.0000000 ***
factor(year)2009 0.0874033 0.0031941 27.3641933 0.0000000 ***
factor(year)2010 0.0933284 0.0032703 28.5380830 0.0000000 ***
factor(year)2011 0.1007152 0.0033239 30.3004603 0.0000000 ***
factor(year)2012 0.1071615 0.0033343 32.1388831 0.0000000 ***
factor(year)2013 0.1134285 0.0033439 33.9209465 0.0000000 ***
factor(year)2014 0.1193723 0.0033483 35.6512280 0.0000000 ***
factor(year)2015 0.1243204 0.0033180 37.4679431 0.0000000 ***
factor(year)2016 0.1285826 0.0033150 38.7882818 0.0000000 ***
factor(year)2017 0.1326065 0.0033490 39.5960757 0.0000000 ***
factor(year)2018 0.1368097 0.0033624 40.6883332 0.0000000 ***
factor(year)2019 0.1408679 0.0033659 41.8520727 0.0000000 ***
factor(year)2020 0.1365253 0.0033476 40.7834587 0.0000000 ***
factor(year)2021 0.1343901 0.0033833 39.7212513 0.0000000 ***
factor(year)2022 0.1390266 0.0034073 40.8030966 0.0000000 ***
ODA.PC 0.0000156 0.0000209 0.7485447 0.4542117
exc_high 0.0055991 0.0024727 2.2643503 0.0236496 *
GDP.PC 0.0000008 0.0000004 2.1973743 0.0280977 *
exc -0.0145511 0.0104027 -1.3987824 0.1620193
ODA.PC:exc_high -0.0000254 0.0000230 -1.1039592 0.2697316
  • R-Squared: 0.8758466
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
31769.99 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
-0.7670403 0.4430576 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
1748.064 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
factor(year)1994 0.0042447 0.0009323 4.5531247 0.0000056 ***
factor(year)1995 0.0085316 0.0013336 6.3974891 0.0000000 ***
factor(year)1996 0.0132511 0.0017433 7.6013312 0.0000000 ***
factor(year)1997 0.0175607 0.0022961 7.6480546 0.0000000 ***
factor(year)1998 0.0222234 0.0025899 8.5808913 0.0000000 ***
factor(year)1999 0.0277789 0.0031025 8.9537242 0.0000000 ***
factor(year)2000 0.0319760 0.0040211 7.9520993 0.0000000 ***
factor(year)2001 0.0375192 0.0042934 8.7388355 0.0000000 ***
factor(year)2002 0.0429128 0.0045968 9.3354095 0.0000000 ***
factor(year)2003 0.0482394 0.0049170 9.8107051 0.0000000 ***
factor(year)2004 0.0546077 0.0051848 10.5322831 0.0000000 ***
factor(year)2005 0.0613845 0.0053971 11.3736255 0.0000000 ***
factor(year)2006 0.0681522 0.0056043 12.1606600 0.0000000 ***
factor(year)2007 0.0750406 0.0058478 12.8322894 0.0000000 ***
factor(year)2008 0.0810286 0.0062050 13.0586257 0.0000000 ***
factor(year)2009 0.0874033 0.0060160 14.5284023 0.0000000 ***
factor(year)2010 0.0933284 0.0066020 14.1363047 0.0000000 ***
factor(year)2011 0.1007152 0.0067515 14.9174254 0.0000000 ***
factor(year)2012 0.1071615 0.0067516 15.8721225 0.0000000 ***
factor(year)2013 0.1134285 0.0069085 16.4185782 0.0000000 ***
factor(year)2014 0.1193723 0.0069354 17.2121333 0.0000000 ***
factor(year)2015 0.1243204 0.0067272 18.4801977 0.0000000 ***
factor(year)2016 0.1285826 0.0067062 19.1737640 0.0000000 ***
factor(year)2017 0.1326065 0.0068810 19.2714175 0.0000000 ***
factor(year)2018 0.1368097 0.0070106 19.5146682 0.0000000 ***
factor(year)2019 0.1408679 0.0070775 19.9034951 0.0000000 ***
factor(year)2020 0.1365253 0.0068482 19.9359559 0.0000000 ***
factor(year)2021 0.1343901 0.0071987 18.6686884 0.0000000 ***
factor(year)2022 0.1390266 0.0075320 18.4581821 0.0000000 ***
ODA.PC 0.0000156 0.0000536 0.2917829 0.7704802
exc_high 0.0055991 0.0071156 0.7868761 0.4314392
GDP.PC 0.0000008 0.0000015 0.5399070 0.5893158
exc -0.0145511 0.0363034 -0.4008193 0.6885921
ODA.PC:exc_high -0.0000254 0.0000586 -0.4328097 0.6651955
Tests
  • Breusch Pagan Test (heteroskedasticity)
statistic p.value parameter method alternative
72.58985 0 5 Breusch-Pagan test heteroskedasticity
  • Variance Inflation Factors - multicollinearity
x
ODA.PC 3.991936
exc_high 3.511692
GDP.PC 1.118002
exc 2.531111
ODA.PC:exc_high 4.837357
  • Test for Fixed Effects
## Multiple parameters; naming those columns df1, df2
df1 df2 statistic p.value method alternative
76 2228 161.7705 0 F test for individual effects significant effects
  • Hausman Test
statistic p.value parameter method alternative
8.396434 0.1356984 5 Hausman Test one model is inconsistent
  • Test for Time-Fixed Effects
## Multiple parameters; naming those columns df1, df2
df1 df2 statistic p.value method alternative
29 2199 181.9916 0 F test for individual effects significant effects
Unit Root Test
  • hdi
statistic p.value parameter method alternative
285.6322 0 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity
  • GDP.PC
statistic p.value parameter method alternative
53.23557 1 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity
  • exc
statistic p.value parameter method alternative
510.5379 0 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity
  • ODA.PC
statistic p.value parameter method alternative
456.0406 0 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity

PIB per cápita

GDP.PC ~ ODA.PC x exc_high + GROW + exc

OLS
term estimate std.error statistic p.value significant
(Intercept) 5457.31764 161.887045 33.7106509 0.0000000 ***
ODA.PC -2.99047 1.916982 -1.5599881 0.1189000
exc_high 1056.33841 199.249762 5.3015793 0.0000001 ***
GROW -663.25484 49.837377 -13.3083818 0.0000000 ***
exc -4811.03582 414.892071 -11.5958731 0.0000000 ***
ODA.PC:exc_high -2.15765 2.208253 -0.9770847 0.3286298
  • R-Squared: 0.1693971
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
33552.24 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
149.8626 0 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
2020.105 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
(Intercept) 5457.31764 231.420909 23.5817830 0.0000000 ***
ODA.PC -2.99047 2.677435 -1.1169159 0.2641467
exc_high 1056.33841 232.776891 4.5379866 0.0000060 ***
GROW -663.25484 63.605863 -10.4275738 0.0000000 ***
exc -4811.03582 427.503253 -11.2537993 0.0000000 ***
ODA.PC:exc_high -2.15765 3.011362 -0.7165033 0.4737533
Fixed Effects
term estimate std.error statistic p.value significant
ODA.PC 8.398996 1.589122 5.285307 0.0000001 ***
exc_high 1210.928154 187.300267 6.465171 0.0000000 ***
GROW -197.056089 52.035842 -3.786930 0.0001566 ***
exc -11440.221401 623.051535 -18.361597 0.0000000 ***
ODA.PC:exc_high -5.493937 1.775653 -3.094038 0.0019990 **
  • R-Squared: 0.1690746
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
26960.19 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
71.62826 0 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
1803.267 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
ODA.PC 8.398996 2.817237 2.981288 0.0029015 **
exc_high 1210.928154 376.825116 3.213502 0.0013300 **
GROW -197.056089 225.433930 -0.874119 0.3821476
exc -11440.221401 1750.670852 -6.534764 0.0000000 ***
ODA.PC:exc_high -5.493937 3.069665 -1.789751 0.0736296 .
Random Effects
term estimate std.error statistic p.value significant
(Intercept) 6598.328413 334.322763 19.736402 0.0000000 ***
ODA.PC 8.403423 1.583761 5.305992 0.0000001 ***
exc_high 1220.627008 185.969935 6.563572 0.0000000 ***
GROW -225.437553 51.422687 -4.384010 0.0000117 ***
exc -10379.795742 586.210100 -17.706614 0.0000000 ***
ODA.PC:exc_high -5.790711 1.773181 -3.265720 0.0010919 **
  • R-Squared: 0.1578743
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
27336.98 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
80.07984 0 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
1825.545 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
(Intercept) 6598.328413 387.297588 17.036844 0.0000000 ***
ODA.PC 8.403423 1.540937 5.453448 0.0000001 ***
exc_high 1220.627008 147.223052 8.291005 0.0000000 ***
GROW -225.437553 62.711540 -3.594834 0.0003314 ***
exc -10379.795742 528.675923 -19.633570 0.0000000 ***
ODA.PC:exc_high -5.790711 1.665353 -3.477168 0.0005161 ***
Time-Fixed Effects
term estimate std.error statistic p.value significant
factor(year)1994 48.9708478 177.794542 0.2754350 0.7830079
factor(year)1995 181.5724476 177.962765 1.0202834 0.3077063
factor(year)1996 247.9395504 178.121278 1.3919704 0.1640721
factor(year)1997 255.7442672 178.472418 1.4329624 0.1520107
factor(year)1998 210.6431927 178.734367 1.1785265 0.2387143
factor(year)1999 197.9781734 178.870113 1.1068265 0.2684900
factor(year)2000 294.1655935 181.926404 1.6169483 0.1060329
factor(year)2001 261.4280169 182.013352 1.4363123 0.1510557
factor(year)2002 235.4560185 182.709485 1.2886907 0.1976412
factor(year)2003 402.6094652 183.321431 2.1961942 0.0281821 *
factor(year)2004 649.6634846 183.657002 3.5373739 0.0004125 ***
factor(year)2005 914.2692860 183.974220 4.9695511 0.0000007 ***
factor(year)2006 1142.2496887 184.281517 6.1983953 0.0000000 ***
factor(year)2007 1506.0265139 184.872673 8.1462906 0.0000000 ***
factor(year)2008 1934.7999586 185.565591 10.4265018 0.0000000 ***
factor(year)2009 1713.9087285 185.587490 9.2350445 0.0000000 ***
factor(year)2010 2206.7300339 187.849409 11.7473355 0.0000000 ***
factor(year)2011 2696.9244552 188.242967 14.3268272 0.0000000 ***
factor(year)2012 2790.3538992 188.279850 14.8202471 0.0000000 ***
factor(year)2013 2890.3594170 188.097950 15.3662463 0.0000000 ***
factor(year)2014 2917.6262964 188.140530 15.5076968 0.0000000 ***
factor(year)2015 2589.5987240 188.484521 13.7390525 0.0000000 ***
factor(year)2016 2533.3835536 188.735364 13.4229405 0.0000000 ***
factor(year)2017 2770.3282983 189.408847 14.6261821 0.0000000 ***
factor(year)2018 2904.9753492 189.338223 15.3427834 0.0000000 ***
factor(year)2019 2847.8067993 189.975605 14.9903815 0.0000000 ***
factor(year)2020 2540.9656729 191.057582 13.2994757 0.0000000 ***
factor(year)2021 2997.7541949 190.319225 15.7511896 0.0000000 ***
factor(year)2022 3285.0738772 189.896826 17.2992564 0.0000000 ***
ODA.PC -0.1352867 1.241521 -0.1089685 0.9132374
exc_high 607.5849699 145.812790 4.1668839 0.0000321 ***
GROW -58.5415162 40.248016 -1.4545193 0.1459451
exc 920.7303505 616.293474 1.4939804 0.1353242
ODA.PC:exc_high -1.6346687 1.366878 -1.1959140 0.2318591
  • R-Squared: 0.521897
  • Breusch-Pagan LM test - Cross Sectional Dependance
statistic p.value parameter method alternative
42869.23 0 2926 Breusch-Pagan LM test for cross-sectional dependence in panels cross-sectional dependence
  • Pesaran CD test - Cross Sectional Dependance
statistic p.value method alternative
13.97098 0 Pesaran CD test for cross-sectional dependence in panels cross-sectional dependence
  • Serial Correlation
statistic p.value parameter method alternative
1802.048 0 30 Breusch-Godfrey/Wooldridge test for serial correlation in panel models serial correlation in idiosyncratic errors
  • Robust covariance matrix estimation
term estimate std.error statistic p.value significant
factor(year)1994 48.9708478 26.546536 1.8447171 0.0652131 .
factor(year)1995 181.5724476 54.606547 3.3251040 0.0008984 ***
factor(year)1996 247.9395504 69.578840 3.5634332 0.0003738 ***
factor(year)1997 255.7442672 80.316002 3.1842255 0.0014717 **
factor(year)1998 210.6431927 96.378416 2.1855847 0.0289512 *
factor(year)1999 197.9781734 91.687981 2.1592598 0.0309378 *
factor(year)2000 294.1655935 153.797853 1.9126769 0.0559192 .
factor(year)2001 261.4280169 147.826428 1.7684796 0.0771194 .
factor(year)2002 235.4560185 171.890756 1.3698004 0.1708891
factor(year)2003 402.6094652 190.174888 2.1170485 0.0343677 *
factor(year)2004 649.6634846 210.427907 3.0873447 0.0020447 **
factor(year)2005 914.2692860 233.036410 3.9232894 0.0000900 ***
factor(year)2006 1142.2496887 252.524870 4.5233156 0.0000064 ***
factor(year)2007 1506.0265139 291.279744 5.1703785 0.0000003 ***
factor(year)2008 1934.7999586 333.887750 5.7947617 0.0000000 ***
factor(year)2009 1713.9087285 297.691733 5.7573272 0.0000000 ***
factor(year)2010 2206.7300339 359.993488 6.1299165 0.0000000 ***
factor(year)2011 2696.9244552 412.546929 6.5372550 0.0000000 ***
factor(year)2012 2790.3538992 420.644764 6.6335163 0.0000000 ***
factor(year)2013 2890.3594170 427.669832 6.7583898 0.0000000 ***
factor(year)2014 2917.6262964 410.741106 7.1033219 0.0000000 ***
factor(year)2015 2589.5987240 373.325279 6.9365748 0.0000000 ***
factor(year)2016 2533.3835536 356.375730 7.1087432 0.0000000 ***
factor(year)2017 2770.3282983 387.191511 7.1549304 0.0000000 ***
factor(year)2018 2904.9753492 383.967306 7.5656841 0.0000000 ***
factor(year)2019 2847.8067993 385.867495 7.3802713 0.0000000 ***
factor(year)2020 2540.9656729 371.796046 6.8342999 0.0000000 ***
factor(year)2021 2997.7541949 397.390788 7.5435926 0.0000000 ***
factor(year)2022 3285.0738772 433.305527 7.5814262 0.0000000 ***
ODA.PC -0.1352867 2.538770 -0.0532883 0.9575070
exc_high 607.5849699 394.773472 1.5390724 0.1239305
GROW -58.5415162 165.905946 -0.3528597 0.7242275
exc 920.7303505 2003.559561 0.4595473 0.6458866
ODA.PC:exc_high -1.6346687 2.797969 -0.5842339 0.5591229
Tests
  • Breusch Pagan Test (heteroskedasticity)
statistic p.value parameter method alternative
191.0749 0 5 Breusch-Pagan test heteroskedasticity
  • Variance Inflation Factors - multicollinearity
x
ODA.PC 4.022979
exc_high 3.472398
GROW 1.070922
exc 2.414705
ODA.PC:exc_high 4.855157
  • Test for Fixed Effects
## Multiple parameters; naming those columns df1, df2
df1 df2 statistic p.value method alternative
76 2228 60.12209 0 F test for individual effects significant effects
  • Hausman Test
statistic p.value parameter method alternative
20.3481 0.001075 5 Hausman Test one model is inconsistent
  • Test for Time-Fixed Effects
## Multiple parameters; naming those columns df1, df2
df1 df2 statistic p.value method alternative
29 2199 55.95795 0 F test for individual effects significant effects
Unit Root Test
  • GDP.PC
statistic p.value parameter method alternative
53.23557 1 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity
  • GROW
statistic p.value parameter method alternative
544.7777 0 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity
  • exc
statistic p.value parameter method alternative
510.5379 0 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity
  • ODA.PC
statistic p.value parameter method alternative
456.0406 0 154 Maddala-Wu Unit-Root Test (ex. var.: Individual Intercepts) stationarity

Tablas y gráficas informativas

## # A tibble: 3 × 2
##   income                `1993 - 2022`
##   <ord>                         <dbl>
## 1 Ingresos Bajos              7.39e11
## 2 Ingresos Medios-bajos       1.08e12
## 3 Ingresos Medios-altos       5.23e11
## # A tibble: 6 × 2
##   region                           `1993 - 2022`
##   <ord>                                    <dbl>
## 1 África Subsahariana              950488709675.
## 2 Asia Oriental y el Pacífico      238077840162.
## 3 Medio Oriente y África del Norte 446654290168.
## 4 Asia del Sur                     303281550904.
## 5 América Latina y el Caribe       187491230376.
## 6 Europa y Asia Central            219340969717.
## # A tibble: 3 × 4
##   income                `1993 - 2007` `2008 - 2017` `2018 - 2022`
##   <ord>                         <dbl>         <dbl>         <dbl>
## 1 Ingresos Bajos         41461879828. 128407580065. 568922430984.
## 2 Ingresos Medios-bajos 108562509747. 249514279951. 725597170717.
## 3 Ingresos Medios-altos  57709379739. 167184309642. 297975050330.
## # A tibble: 6 × 4
##   region                           `1993 - 2007` `2008 - 2017` `2018 - 2022`
##   <ord>                                    <dbl>         <dbl>         <dbl>
## 1 África Subsahariana               80397939928. 213650540163. 656440229584.
## 2 Asia Oriental y el Pacífico       40231549807.  74133449865. 123712840490.
## 3 Medio Oriente y África del Norte  28067739666. 100246809658. 318339740844.
## 4 Asia del Sur                      23746930111.  62526970089. 217007650704.
## 5 América Latina y el Caribe        21996269822.  46083500071. 119411460483.
## 6 Europa y Asia Central             13293339980.  48464899812. 157582729925.
fit <- lm(hdi ~ ODA.PC ,data = datos_model)
plot_ly(x = datos_model$ODA.PC, y = datos_model$hdi, type = 'scatter', mode = 'markers') %>%
  add_lines(x = datos_model$ODA.PC, fitted(fit)) %>% 
  layout(title = 'Índice de desarrollo humano vs. ODA per cápita', showlegend = FALSE,
         yaxis = list(title = 'HDI'), xaxis = list(title = 'ODA per cápita (Dolares actuales)'),
         annotations = list(x = 0, y = -0.1, text = "Fuente: datos del Banco Mundial", showarrow = F, xref='paper', yref='paper'))
fit <- lm(hdi ~ GDP.PC ,data = datos_model)
plot_ly(x = datos_model$GDP.PC, y = datos_model$hdi, type = 'scatter', mode = 'markers') %>%
  add_lines(x = datos_model$GDP.PC, fitted(fit)) %>% 
  layout(title = 'Índice de desarrollo humano vs. PIB per cápita', showlegend = FALSE,
         yaxis = list(title = 'HDI'), xaxis = list(title = 'PIB per cápita (Dolares actuales)'),
         annotations = list(x = 0, y = -0.1, text = "Fuente: datos del Banco Mundial", showarrow = F, xref='paper', yref='paper'))
fit <- lm(hdi ~ exc ,data = datos_model)
plot_ly(x = datos_model$exc, y = datos_model$hdi, type = 'scatter', mode = 'markers') %>%
  add_lines(x = datos_model$exc, fitted(fit)) %>% 
  layout(title = 'Índice de desarrollo humano vs. Índice de exclusión por género', showlegend = FALSE,
         yaxis = list(title = 'HDI'), xaxis = list(title = 'Índice de exclusión por género'),
         annotations = list(x = 0, y = -0.1, text = "Fuente: Banco Mundial, V-Dem", showarrow = F, xref='paper', yref='paper'))
fit <- lm(GDP.PC ~ ODA.PC ,data = datos_model)
plot_ly(x = datos_model$ODA.PC, y = datos_model$GDP.PC, type = 'scatter', mode = 'markers') %>%
  add_lines(x = datos_model$ODA.PC, fitted(fit)) %>% 
  layout(title = 'PIB per cápita vs. ODA per cápita', showlegend = FALSE,
         yaxis = list(title = 'PIB per cápita (Dolares actuales)'), xaxis = list(title = 'ODA per cápita (Dolares actuales)'),
         annotations = list(x = 0, y = -0.1, text = "Fuente: datos del Banco Mundial", showarrow = F, xref='paper', yref='paper'))
fit <- lm(GDP.PC ~ GROW ,data = datos_model)
plot_ly(x = datos_model$GROW, y = datos_model$GDP.PC, type = 'scatter', mode = 'markers') %>%
  add_lines(x = datos_model$GROW, fitted(fit)) %>% 
  layout(title = 'PIB per cápita vs. Crecimiento poblacional', showlegend = FALSE,
         yaxis = list(title = 'PIB per cápita (Dolares actuales)'), xaxis = list(title = 'Crecimiento poblacional (en porcentaje)'),
         annotations = list(x = 0, y = -0.1, text = "Fuente: datos del Banco Mundial", showarrow = F, xref='paper', yref='paper'))
fit <- lm(GDP.PC ~ exc ,data = datos_model)
plot_ly(x = datos_model$exc, y = datos_model$GDP.PC, type = 'scatter', mode = 'markers') %>%
  add_lines(x = datos_model$exc, fitted(fit)) %>% 
  layout(title = 'PIB per cápita vs. Índice de exclusión por género', showlegend = FALSE,
         yaxis = list(title = 'PIB per cápita (Dolares actuales)'), xaxis = list(title = 'Índice de exclusión por género'),
         annotations = list(x = 0, y = -0.1, text = "Fuente: Banco Mundial, V-Dem", showarrow = F, xref='paper', yref='paper'))